package com.ykq.auth.feign;

import com.ykq.common.entity.AclPermission;
import com.ykq.common.entity.AclUser;
import com.ykq.common.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @program: qy156-education-cloud
 * @description:
 * @author: 闫克起
 * @create: 2022-12-01 14:34
 * 调用远程微服务education-system.
 **/
@FeignClient(value = "education-system")
public interface SystemFeign {

    //根据账户查询用户信息
    @GetMapping("/system/user/getByName/{username}")
    public Result<AclUser> getByName(@PathVariable String username);

    //根据用户id查询对应的权限
    @GetMapping("/system/permission/getByUserid/{userid}")
    public Result<List<AclPermission>> getByUserid(@PathVariable String userid);
}
